<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <style>
        .dsn {
            display: none;
        }
    </style>
</head>

<body>
    <button>点击</button>
    <div id="app">
        <p> asdfasdfasdfasdfasdf </p>
        <p> asdfasdfasdfasdfasdf </p>
        <p> asdfasdfasdfasdfasdf </p>
        <p> asdfasdfasdfasdfasdf </p>
    </div>

    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
    <script>
        $('button').on('click', function() {
            // 若#app没有dsn类就加上,有则移除
            $('#app').toggleClass('dsn');
        })
    </script>
</body>

</html>